<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



Route::get('/', 'Web\HomeController@home');
Route::get('/sms', 'Web\HomeController@sms');

Auth::routes();

Route::any('/up', 'Web\HomeController@upfile');


Route::get('/cert', 'Web\CertificationController@order')->name('cert');
Route::get('/cert/order', 'Web\CertificationController@order');
//扣款
Route::get('/pay/order_pay ', 'Web\PayController@order_pay')->name("pay");
//充值
Route::get('/pay/recharge/','Web\PayController@recharge');

Route::any('/cert/material', 'Web\CertificationController@materialgw')->name("material");
Route::any('/cert/certification', 'Web\CertificationController@materialsm')->name("certification");
Route::any('/cert/ajaxmaterialsm', 'Web\CertificationController@ajaxmaterialsm')->name('ajaxmaterialsm');
Route::any('/cert/ajaxmaterialgw', 'Web\CertificationController@ajaxmaterialgw')->name('ajaxmaterialgw');


Route::any('/accounts/monitor/', 'Web\AccountsController@monitor');

Route::any('/accounts/user', 'Web\AccountsController@user');
Route::any('/accounts/email', 'Web\AccountsController@email');
Route::any('/accounts/phone', 'Web\AccountsController@phone');
Route::post('/accounts/chkcode', 'Web\AccountsController@chkcode');
//邮箱反馈验证
Route::get('/cemail', 'Web\HomeController@cemail');



//Route::get('/shimingrenzheng','Web\AuthenticationController@smrz')->name('shiming');
Route::any('/qiyerenzheng','Web\AuthenticationController@qy')->name('qiye');
Route::any('/guanwangrenzheng','Web\AuthenticationController@gw')->name('gw');
Route::any('/trial', 'Web\AuthenticationController@trial')->name('trial');
Route::get('/success', 'Web\AuthenticationController@success')->name('success');

Route::get('/news',"Web\NewsController@index")->name('news');

//帮助
Route::get('/help',"Web\HelpController@index")->name('help');

//首页快速查询
Route::any('/searchsite', 'Web\AuthenticationController@searchsite')->name('searchsite');

Route::prefix('admin')->group(function () {

    Route::any('logout', "Admin\PublicController@logout")->name('admin_logout');

    //登陆页面
    Route::match(['get', 'post'],'login', "Admin\PublicController@login")->name('admin_login');

    //控制台页面
    Route::get('/', "Admin\IndexController@index");
    Route::get('index', "Admin\IndexController@index");

    //订单首页
    Route::any('order',"Admin\OrderController@index");
    //过期订单
    Route::any('order/overdue',"Admin\OrderController@overdue");
    //订单审核
    Route::any('order/reviewed/{order_id}',"Admin\OrderController@reviewed")->name('order_reviewed');
    //订单查看
    Route::any('order/detailed/{user}',"Admin\OrderController@detailed");
    //订单统计
    Route::any('order/statistics',"Admin\OrderController@statistics");

    //内容管理
    Route::any('article', "Admin\ArticleController@index")->name('admin.Article');
    Route::any('article/create', "Admin\ArticleController@create")->name('admin.Article.create');
    Route::any('article/edit/{id}', "Admin\ArticleController@edit")->name('admin.Article.edit');
    Route::any('article/delete/{id}', "Admin\ArticleController@delete")->name('admin.Article.delete');
     //文章分类
    Route::any('article_type', "Admin\ArticleClassController@index")->name('admin.ArticleClass');
    Route::any('article_type/create', "Admin\ArticleClassController@create")->name('admin.ArticleClass.create');
    Route::any('article_type/edit/{id}', "Admin\ArticleClassController@edit")->name('admin.ArticleClass.edit');
    Route::any('article_type/delete/{id}', "Admin\ArticleClassController@destroy")->name('admin.ArticleClass.delete');
    

    //单页
    Route::any('apage',"Admin\ApageController@index")->name('admin.Apage');
    Route::any('apage/create',"Admin\ApageController@create")->name('admin.Apage.create');
    Route::any('apage/edit/{id}',"Admin\ApageController@edit")->name('admin.Apage.edit');
    Route::any('apage/delete/{id}',"Admin\ApageController@destroy")->name('admin.Apage.delete');
    

    //用户管理
    Route::any('user',"Admin\UserController@index")->name('admin.User.index');
    Route::any('user/detailed/{id}',"Admin\UserController@detailed");
    Route::any('user/edit/{id}',"Admin\UserController@edit")->name('admin.User.edit');
    Route::any('tag',"Admin\UserController@tag");
    Route::any('admin',"Admin\AdminController@index")->name('admin.Admin.index');
    Route::any('admin/create',"Admin\AdminController@create")->name('admin.Admin.create');;
    Route::any('admin/edit{id}',"Admin\AdminController@edit")->name('admin.Admin.edit');

    //幻灯管理
    Route::any('media/slide',"Admin\SlideController@index");
    //内容块管理
    Route::any('media/block',"Admin\BlockController@index");

    //站点信息
    Route::any('seting/website',"Admin\SetingController@website")->name('admin.seting.website');
    //联系信息
    Route::any('seting/contact',"Admin\SetingController@contact");
    Route::any('log',"Admin\LogController@index");

    //后台上传
    Route::post('upload/local',"Admin\UploadController@local")->name('admin.upload.images');

});



